home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir36 / sparkl35.zip / MENU.BAT < prev    next >
DOS Batch File  |  1994-09-25  |  2KB  |  85 lines

  1. @echo off
  2. echo off
  3. cls
  4. echo  We added this simple batch file to give you a "template" you can
  5. echo  use to create "scrolling bar" menus using Sparkle.  Just run this.
  6. echo  Then view or print it to see how easy it is.  You can then copy
  7. echo  this to form the basis of your own menus.
  8. echo   
  9. pause
  10. cls
  11. echo            Here's an example of how to create a menu using Sparkle.
  12. :
  13. :---- FIRST display some menu options.  Here we'll use Sparkle's WINDOW
  14. :     option -- twice for some color.  "-6" means EXPLODE the window.
  15. :
  16. sparkle -6 6 1 22 80 32 32 /
  17. sparkle -6 7 10 20 71 79 -2 /... Main Menu ...
  18. :
  19. :---- SECOND, print the 4 menu options (plus Quit)
  20. :
  21. sparkle 5 10 31   112 /── This is option 1 ──
  22. sparkle 5 12 31   112 /── This is option 2 ──
  23. sparkle 5 14 31   112 /── This is option 3 ──
  24. sparkle 5 16 31   112 /── This is option 4 ──
  25. sparkle 5 18 31   112 /──       Quit       ──
  26. :
  27. :---- THIRD, tell Sparkle to turn this into a VERTICAL Bar menu (direction = 1).
  28. :     We use Sparkle's option #2 (bar menu).  And we tell Sparkle to look for
  29. :     menu options starting at row 10, column 30 (top left) to row 18 column 53
  30. :     (bottom right).  We also tell Sparkle to highlight options using color
  31. :     15 (bright white on black).
  32. :
  33. sparkle 2 10 30 18 53 15 1
  34. :
  35. :---- If this was YOUR menu, you'd edit the following lines to do what YOU
  36. :     want to as each option is chosen.
  37. :
  38. If Errorlevel 88 Goto Error
  39. If Errorlevel 27 Goto EscPressed
  40. If Errorlevel  5 Goto 5thOption
  41. If Errorlevel  4 Goto 4thOption
  42. If Errorlevel  3 Goto 3rdOption
  43. If Errorlevel  2 Goto 2ndOption
  44. If Errorlevel  1 Goto 1stOption
  45. Goto End
  46. :
  47. :Error
  48. :
  49. echo An error must have occurred.  Possibly someone changed this and I can't
  50. echo find or process the menu.  Sorry.  Check the batch file.
  51. goto end
  52. :
  53. :EscPressed
  54. :
  55. echo You pressed Escape.
  56. goto end
  57. :
  58. :1stOption
  59. :
  60. echo You selected the 1st option
  61. goto end
  62. :
  63. :2ndOption
  64. :
  65. echo You selected the 2nd option
  66. goto end
  67. :
  68. :3rdOption
  69. :
  70. echo You selected the 3rd option
  71. goto end
  72. :
  73. :4thOption
  74. :
  75. echo You selected the 4th option
  76. goto end
  77. :
  78. :5thOption
  79. :
  80. echo You selected the 5th option -- Quit
  81. :
  82. :End
  83. :
  84.  
  85.